<div class="peopleRecomendations form">
<?php echo $this->Form->create('PeopleRecomendation');?>
	<fieldset>
 		<legend><?php __('Asociar una Recomendación Existente'); ?></legend>
<?php

	if(!empty($recomendationes_existentes)){
?>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th>&nbsp;</th>
			<th><?php __('Nombre'); ?></th>
			<th><?php __('Contenido'); ?></th>
	</tr>
	<?php
	$i = 0;

	foreach ($recomendationes_existentes as $recomendacion):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td width="1"><?php echo $form->checkbox('Recomendationes.arreglo_id_recomendaciones.'.$recomendacion['Recomendation']['id'],array('value' => $recomendacion['Recomendation']['id'])); ?></td>
		<td width="200"><?php echo $recomendacion['Recomendation']['name']; ?></td>
		<td><?php echo $expandible->vermas(nl2br($recomendacion['Recomendation']['contenido']), 150); ?></td>
	</tr>
<?php endforeach; ?>
	</table>

<?php
	}else{
		echo "No se registran datos...<br/>";
	}
?>
	<?php
		echo $this->Form->input('Recomendation.recomendacion_nueva',array( 'type' => 'hidden', 'value' => 'N'));
		echo $this->Form->input('person_id',array( 'type' => 'hidden', 'value' => $id_paciente));
	?>
	</fieldset>
	<?php echo $this->Form->end(__('Agregar', true));?>

<?php echo $this->Form->create('PeopleRecomendation');?>
	<fieldset>
 		<legend><?php __('Cargar una Nueva Recomendación'); ?></legend>
<?php
		echo $this->Form->input('person_id',array( 'type' => 'hidden', 'value' => $id_paciente));
		echo $this->Form->input('Recomendation.recomendacion_nueva',array( 'type' => 'hidden', 'value' => 'S'));
		echo $this->Form->input('Recomendation.name',array( 'label' => 'Nombre'));
		echo $this->Form->input('Recomendation.contenido');
		echo $this->Form->input('publica',array( 'type' => 'select',  'options' => array('S'=>'Sí','N'=>'No'),'selected' => 'S','label' => '¿Público?', 'size' => '1'));
?>
	</fieldset>
	<?php echo $this->Form->end(__('Cargar', true));?>
</div>